<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>响应式设计测试</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            margin: 0;
            padding: 20px;
            background: #f8fafc;
        }
        
        .test-container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        .device-info {
            background: #ff6b35;
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
        }
        
        .grid-demo {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .card-demo {
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            padding: 16px;
            text-align: center;
        }
        
        .header-demo {
            height: 90px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            margin-bottom: 20px;
        }
        
        .logo-demo {
            height: 50px;
            width: 120px;
            background: #ff6b35;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
        }
        
        .search-demo {
            width: 280px;
            height: 40px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 0 15px;
        }
        
        .sidebar-demo {
            width: 240px;
            height: 400px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        /* 响应式测试样式 */
        @media (max-width: 768px) {
            .device-info::after {
                content: " - 平板模式";
            }
            
            .header-demo {
                height: 60px;
                padding: 0 15px;
            }
            
            .logo-demo {
                height: 40px;
                width: 100px;
            }
            
            .search-demo {
                width: 200px;
                height: 36px;
            }
            
            .sidebar-demo {
                width: 200px;
            }
            
            .grid-demo {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
                gap: 15px;
            }
        }
        
        @media (max-width: 480px) {
            .device-info::after {
                content: " - 手机模式";
            }
            
            .test-container {
                padding: 15px;
                margin: 10px;
            }
            
            .header-demo {
                height: 56px;
                padding: 0 10px;
            }
            
            .logo-demo {
                height: 35px;
                width: 80px;
                font-size: 12px;
            }
            
            .search-demo {
                width: 160px;
                height: 32px;
            }
            
            .sidebar-demo {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                height: 80px;
                border-radius: 0;
                border-top: 1px solid #e2e8f0;
                border-left: none;
                border-right: none;
                border-bottom: none;
                display: flex;
                align-items: center;
                justify-content: space-around;
                background: white;
                z-index: 1000;
            }
            
            .grid-demo {
                grid-template-columns: 1fr;
                gap: 12px;
                margin-bottom: 100px; /* 为底部导航留空间 */
            }
        }
    </style>
</head>
<body>
    <div class="test-container">
        <div class="device-info">
            响应式设计测试页面
        </div>
        
        <h2>头部组件测试</h2>
        <div class="header-demo">
            <div class="logo-demo">LOGO</div>
            <input class="search-demo" placeholder="搜索直播间...">
            <div style="width: 40px; height: 40px; background: #64748b; border-radius: 50%;"></div>
        </div>
        
        <h2>侧边栏组件测试</h2>
        <div class="sidebar-demo">
            <div style="margin-bottom: 15px; font-weight: 600;">推荐频道</div>
            <div style="margin-bottom: 10px; padding: 8px; background: #f1f5f9; border-radius: 6px;">频道 1</div>
            <div style="margin-bottom: 10px; padding: 8px; background: #f1f5f9; border-radius: 6px;">频道 2</div>
            <div style="margin-bottom: 10px; padding: 8px; background: #f1f5f9; border-radius: 6px;">频道 3</div>
        </div>
        
        <h2>直播卡片网格测试</h2>
        <div class="grid-demo">
            <div class="card-demo">
                <div style="height: 160px; background: #e2e8f0; border-radius: 8px; margin-bottom: 10px;"></div>
                <div style="font-weight: 600; margin-bottom: 5px;">直播间标题</div>
                <div style="color: #64748b; font-size: 14px;">主播名称</div>
            </div>
            <div class="card-demo">
                <div style="height: 160px; background: #e2e8f0; border-radius: 8px; margin-bottom: 10px;"></div>
                <div style="font-weight: 600; margin-bottom: 5px;">直播间标题</div>
                <div style="color: #64748b; font-size: 14px;">主播名称</div>
            </div>
            <div class="card-demo">
                <div style="height: 160px; background: #e2e8f0; border-radius: 8px; margin-bottom: 10px;"></div>
                <div style="font-weight: 600; margin-bottom: 5px;">直播间标题</div>
                <div style="color: #64748b; font-size: 14px;">主播名称</div>
            </div>
        </div>
        
        <div style="text-align: center; color: #64748b; margin-top: 30px;">
            <p>请调整浏览器窗口大小或使用开发者工具测试不同设备尺寸</p>
            <p>断点：768px (平板), 480px (手机)</p>
        </div>
    </div>
</body>
</html>
